import axios from '../utils/request'


//商品渲染列表
export const shoppingList = ((params) => {
    return axios({
        method: 'get',
        url: '/api/getgoods',
        params
    })
})

//详情渲染列表
export const shoppGetdesc = ((id) => {
    return axios({
        method: 'get',
        url: `/api/goods/getdesc/${id}`,
    })
})

//商品图片轮播图
export const shoppingImg = ((id) => {
    return axios({
        method: 'get',
        url: '/api/getthumimages/' + id,

    })
})



//商品标题价格...
export const shoppingGetinfo = ((id) => {
    return axios({
        method: 'get',
        url: '/api/goods/getinfo/' + id,

    })
})

//商品评论
export const shoppingGetcomments = ((id, params) => {
    return axios({
        method: 'get',
        url: '/api/getcomments/' + id,
        params

    })
})

//提交评论
export const shoppingPostcommen = ((id, data) => {
    return axios({
        method: 'post',
        url: '/api/postcomment/' + id,
        data: 'content=' + data

    })
})
